package com.gitee.neuray.security.admin.codelist.controller;

import com.gitee.neuray.security.common.msg.ListRestResponse;
import com.gitee.neuray.security.common.util.QueryExple;
import org.springframework.web.bind.annotation.*;
import com.gitee.neuray.security.common.rest.BaseController;

import com.gitee.neuray.security.admin.codelist.entity.SysCodeListEntity;
import com.gitee.neuray.security.admin.codelist.biz.SysCodeListBiz;

import java.util.List;
import java.util.Map;


/**
 * 字典表
 *
 * @author 张宏宇
 * @email ${email}
 * @date 2020-03-03 11:48:26
 */
@RestController
@RequestMapping("codelist")
public class SysCodeListController extends BaseController<SysCodeListBiz, SysCodeListEntity>{
    @RequestMapping(value = "byName",method = RequestMethod.GET)
    @ResponseBody
    public ListRestResponse<SysCodeListEntity> selectCodesByName(@RequestParam String name){
        List<SysCodeListEntity> codes = baseBiz.selectCodes(name);
        return new ListRestResponse("",codes.size(),codes);
    }

}
